package cn.lqz.bucttrain.pojo.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 订单分页查询
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class OrderPageQueryDTO extends PageDTO{
    /**
     * 订单id
     */
    private Long orderId;
    /**
     * 订单编号
     */
    private String orderNumber;
    /**
     * 路线id
     */
    private Long routeId;
    /**
     * 乘客手机号
     */
    private String passengerPhoneNumber;
    /**
     * 座位类型
     */
    private Integer seatType;
    /**
     * 座位行号
     */
    private Integer seatRowNo;
    /**
     * 座位列号
     */
    private Integer seatColNo;
    /**
     * 支付用户手机号
     */
    private String paidUserPhoneNumber;
    /**
     * 价格（范围起始）
     */
    private BigDecimal priceStart;
    /**
     * 价格（范围结束）
     */
    private BigDecimal priceEnd;
    /**
     * 订单状态
     */
    private Integer status;

    /**
     * 订单时间（范围起始）
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime orderTimeStart;

    /**
     * 订单时间（范围结束）
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime orderTimeEnd;

}
